package com.bz.common;

public enum Codeenum {

    SUCCESS(1, "success"),
    CONTENTTYPE_ERROR(2, "contentType error"),
    TOKEN_ERROR(3, "token error"),
    BUSINESS_ERROR(8, "business error"),
    ERROR(9, "system error"),
    NOT_FIND(404, "not find"),

    PARAM_ERROR(10001, "param not null!"),
    UOLOAD_FILE_ERROR(10002, "upload file fail"),
    NOT_LOGIN(1003, "not login"),
    USER_PAS_ERROR(1005, "username or password not correct"),
    ALL_ERROR(9999, "orther error"),
    NOT_RIGHT(1007, "not right");

    private final int    code;
    private final String msg;

    // （2）编写枚举类构造方法
    Codeenum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    // （4）编写方法获取枚举类中对应的值
    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
